app.controller('sys_configController', ['$scope', 'httpWrapService', '$state', '$stateParams','AppConstants','TableFactory',
        function($scope, httpWrapService, $state, $stateParams,AppConstants, TableFactory) {

	$scope.params = {};
	var type = $scope.params.type = {
			field : 'type',
			type : AppConstants.filter.CONTAINS,
			term : ''
	};
	var label = $scope.params.label = {
			field : 'label',
			type : AppConstants.filter.CONTAINS,
			term : ''
	};
	var value = $scope.params.value = {
			field : 'value',
			type : AppConstants.filter.CONTAINS,
			term : ''
	};
	var description = $scope.params.description = {
			field : 'description',
			type : AppConstants.filter.CONTAINS,
			term : ''
	};
	
    $scope.Table1 = TableFactory.newInstance({
		url : 'system/config/list.do',
		params : [type, label, value, description]
	});
    $scope.Table1.load();

//    $scope.delete = function(target) {
//        var id = target.$parent.row.entity.id;
//        httpWrapService.defaultGridDelete($scope.Grid, id,'system/config/delete/'+ id +'.do').then(function(res){
//            $scope.Grid.deleteRow(target.$parent.row.entity);
//        });
//    };

}]);